﻿namespace IceCS.DataStructure.Core.Queue
{
    /// <summary>
    /// 队列接口
    /// </summary>
    /// <typeparam name="T"></typeparam>
    public interface IQueue<T>
    {
        /// <summary>
        /// 入队操作
        /// </summary>
        /// <param name="data"></param>
        void Enqueue(T data);
        /// <summary>
        /// 出队操作
        /// </summary>
        /// <returns></returns>
        T Dequeue();
        /// <summary>
        /// 获取队列头元素
        /// </summary>
        /// <returns></returns>
        T Peek();
        /// <summary>
        /// 获取队列长度
        /// </summary>
        /// <returns></returns>
        int Count { get; }
        /// <summary>
        /// 清空队列
        /// </summary>
        void Clear();
        /// <summary>
        /// 判断队列是否为满
        /// </summary>
        /// <returns></returns>
        bool IsFull { get; }
        /// <summary>
        /// 判断队列是否为空
        /// </summary>
        /// <returns></returns>
        bool IsEmpty { get; }
    }
}
